<template>
  <div class="home">
    <div class="title">十分治愈后台管理系统</div>
    <el-container style="height: 200vh">
      <el-aside height="100%" width="200px" style="background-color:#FFF">
        <el-radio-group v-model="isCollapse" style="margin-bottom: 20px">
          <el-radio-button :label="false">展开</el-radio-button>
          <el-radio-button :label="true">收起</el-radio-button>
        </el-radio-group>
        <el-menu
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          :collapse="isCollapse"
        >

        <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">精选文章</span>
            </template>
            <el-menu-item-group>
              <!-- <span slot="title">分组一</span> -->
              <el-menu-item index="1-1"><router-link to="/index/JingXuanContext">精选文章</router-link></el-menu-item>
              <el-menu-item index="1-2"><router-link to="/index/CourseEvaluation">评价管理</router-link></el-menu-item>
            </el-menu-item-group>
          </el-submenu>

          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">公益中心</span>
            </template>
            <el-menu-item-group>
              <!-- <span slot="title">分组一</span> -->
              <el-menu-item index="2-1"><router-link to="/index/WelfareContentView">公益管理</router-link></el-menu-item>
            </el-menu-item-group>
          </el-submenu>

          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">心理答疑</span>
            </template>
            <el-menu-item-group>
              <!-- <span slot="title">分组一</span> -->
              <el-menu-item index="3-1"><router-link to="/index/consultproblem">咨询问题</router-link></el-menu-item>
              <el-menu-item index="3-2"><router-link to="/index/consultReply">咨询回复</router-link></el-menu-item>
            </el-menu-item-group>
          </el-submenu>

          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">试题库</span>
            </template>
            <el-menu-item-group>
              <router-link to="/heartmark"><el-menu-item index="4-1">试卷管理</el-menu-item></router-link>

            </el-menu-item-group>
          </el-submenu>

          <el-submenu index="5">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">心理知识</span>
            </template>
            <el-menu-item-group>
              <!-- <span slot="title">分组一</span> -->
<!--              <el-menu-item index="5-1">推送文章</el-menu-item>-->
              <router-link to="/index/HeartKnowledge"><el-menu-item index="5-1">推送文章</el-menu-item></router-link>
            </el-menu-item-group>
          </el-submenu>

          <el-submenu index="6">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">FM</span>
            </template>
            <el-menu-item-group>
              <!-- <span slot="title">分组一</span> -->
              <el-menu-item index="6-1"><router-link to="/index/FM">推送FM</router-link></el-menu-item>
            </el-menu-item-group>
          </el-submenu>

          <el-submenu index="7">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">公告管理</span>
            </template>
            <el-menu-item-group>
              <!-- <span slot="title">分组一</span> -->
              <el-menu-item index="7-1" ><router-link to="/notice">发通知</router-link></el-menu-item>
            </el-menu-item-group>
          </el-submenu>

          <!--课程管理-->
          <el-submenu index="8">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">课程管理</span>
            </template>
            <el-menu-item-group>
              <!-- <span slot="title">分组一</span> -->
              <el-menu-item index="8-1">
                <router-link to="/kecheng">课程管理</router-link>
              </el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          
        </el-menu>
      </el-aside>

      <el-container>
        <el-header style="text-align: right; font-size: 12px">
          <!-- 头部内容 -->
          <div class="head">


          </div>
        </el-header>

        <el-main>
          <!-- 主要内容 -->
          <router-view></router-view>
        </el-main>

      </el-container>
    </el-container>
    </div>

</template>
   
   <script>
export default {
  data() {
    return {
      uid: "",
      username: "",
      isCollapse: false,
    };
  },
  created() {
    this.uid = sessionStorage.getItem("uid");
    this.username = sessionStorage.getItem("username");

    console.log(this.uid);
    console.log(this.username);
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>
   
<style scoped>

/*  .home{*/

/* background-image: url("../image/zhuanye.png");*/
/*  }*/
a{
    text-decoration: none;
}

.title {
  background-color:#31A8FF;
  height: 4rem;
  line-height: 4rem;
  color: white;
  font-size: 2rem;
  text-align: center;
  margin: 0 auto;
}

.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
}
</style>


